<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <script>
    // new  1. 创建空对象
    //      2. 让this指向空对象
    //      3. 正常执行代码 将数据 添加给 this对象
    //      4. 将 对象 返回出去

    function Test() {
      // var this = {}

      this.uname = 'zs'
      this.age = 18

      // return this
    }

    var t = new Test() 

    console.log(t)  
  </script>
</body>
</html>